package com.youdoneed.news.news.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.youdoneed.news.news.entity.CmfTermRelationships;
@Mapper
public interface CmfTermRelationshipsMapper {
    int deleteByPrimaryKey(Long tid);

    int insert(CmfTermRelationships record);

    int insertSelective(CmfTermRelationships record);

    CmfTermRelationships selectByPrimaryKey(Long tid);

    int updateByPrimaryKeySelective(CmfTermRelationships record);

    int updateByPrimaryKey(CmfTermRelationships record);
    
    /**
     * 获取文章与栏目关系列表
     * @param termId
     * @return
     */
    List<CmfTermRelationships> getTermRelationships(Long termId);
    
    CmfTermRelationships getTremsRelByPostId(Long ObjectId);
    
    List<CmfTermRelationships> getTermRels(@Param("lastTime") String lastTime,@Param("termId") Long termId);
    /**
     * 热评新闻列表
     * @param lastTime
     * @return
     */
    List<CmfTermRelationships> getTermRelations(@Param("lastTime") String lastTime);
    
}